package com.devunion.salon.client.app.mvc.controller;

import com.devunion.salon.client.app.mvc.SalonEvents;
import com.devunion.salon.client.app.mvc.view.ProductListView;
import com.extjs.gxt.ui.client.mvc.AppEvent;
import com.extjs.gxt.ui.client.mvc.Controller;

/**
 * @author spetrakovsky
 */
public class ProductListController extends Controller {

    private ProductListView view;

    public ProductListController() {
        registerEventTypes(SalonEvents.NAVIGATE_PRODUCT_LIST_VIEW);
    }

    protected void initialize() {
        view = new ProductListView(this);
    }

    public void handleEvent(AppEvent<?> event) {
        forwardToView(view, event);
    }
}
